Skip to content

Add tests for the Translation Memory tab views#4255

Open
mvanhorn wants to merge 1 commit into
mozilla:mainfrom
mvanhorn:fix/4173-2026-06-24-164-tests-pontoon-tm-tab-views
Open

Add tests for the Translation Memory tab views#4255
mvanhorn wants to merge 1 commit into
mozilla:mainfrom
mvanhorn:fix/4173-2026-06-24-164-tests-pontoon-tm-tab-views

Conversation

@mvanhorn

Copy link
Copy Markdown

Summary

Adds unit-test coverage for the translation-memory (TM) tab views in the teams app, which previously had no tests exercising their rendering and access rules.

Why this matters

The TM tab views were untested, so regressions in their permission handling or rendering could land unnoticed. This adds targeted tests covering the view responses and the access rules they enforce, raising coverage on a user-facing surface without changing behavior. Reported in #4173.

Testing

The new tests live in pontoon/teams/tests/test_views.py and pass under the project's pytest suite (Django was not installed in the authoring environment; the tests follow the existing fixture patterns in pontoon/test/fixtures).

Closes #4173

@functionzz

Copy link
Copy Markdown
Collaborator

Hey Matt, thanks for the contribution! Will get to this one soon :)

@mathjazz mathjazz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the test coverage!

The only area called out in #4173 that is not covered here is ajax_translation_memory_upload. It would be great to include at least basic upload tests (permissions, locale scoping, and a successful upload path) before considering the issue fully resolved.

Otherwise, the coverage added for listing, grouping, search, pagination validation, and locale isolation looks aligned with the issue requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for the Translation Memory tab views

3 participants